<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="../Fantacalcio/js/validate.js"></script>
<link rel=stylesheet href="css/style.css" type="text/css">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic-el" prefix="logic" %>
<title>Fantacalcio | Aggiungi Discussione</title>
</head>
<body>
	<c:if test="${userInSession == null }">
		<c:redirect url="Logout.do"></c:redirect>
	</c:if>
		
	<c:import url="/head.jsp"/>
	
	<c:import url="/menu.jsp"/>
	
	<c:import url="menuForum.jsp"/>
	
	<div class="context">
		<h1> Aggiungi Discussione </h1>
		<html:errors/>
		<c:if test="${msg != null }">
			<div class="error">
				<span>${msg}</span>
			</div>
		</c:if>
		<html:form action="ConfermaCreateArgomentoAction.do" styleId="formargomento">
			<table>
				<tr>
					<td><label class="prop">Titolo:</label></td>
					<td><html:text property="titolo"/></td>
				</tr>
				<tr>
					<td><label class="prop">Descrizione:</label></td>
					<td><html:text property="descrizione"/></td>
				</tr>
				<tr>
					<td><label class="prop">Categoria:</label></td>
					<td>
						<html:select property="idCategoria">
							<html:option value="0">--seleziona una categoria--</html:option>
							<logic:iterate id="categoria" name="listaCategoria">
								<html:option value="${categoria.id }">${categoria.titolo}</html:option>
							</logic:iterate>
						</html:select>
					</td>
				</tr>
			</table>
		<html:hidden property="codOp" value="aggiungi"/>
		<div class="bottomS"><html:submit value="Salva" onclick="return validateFormArgomento();"/></div>
		<div class="bottomD"><html:reset /></div>
		</html:form>
	</div>
	
	<c:import url="/footer.jsp"/>

</body>
</html>